home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextLibrary / Frameworks / NEXTIME.framework / Versions / A / Headers / NTRealTimeCallout.h < prev    next >
Encoding:
Text File  |  1995-08-30  |  1.1 KB  |  52 lines

  1. /*
  2.  *    NTRealTimeCallout.h
  3.  *     Copyright 1993, NeXT, Inc.
  4.  *    
  5.  *    21Dec93 mpaque Created.
  6.  */
  7.  
  8. #import "NTThread.h"
  9.  
  10. // timer function pointer type
  11. typedef void (*timerFunc)(void *arg, double now);
  12.  
  13. //
  14. // NTScheduleCallback:
  15. //
  16. //    Schedule a callback to be performed at some absolute real time.
  17. //    The callback is dequeued when that time arrives.
  18. //
  19.  void
  20. NTScheduleCallback(    NTThreadPriority priority,
  21.             timerFunc func,
  22.             void *    arg,
  23.             double    time );
  24. //
  25. // NTDescheduleCallback:
  26. //
  27. //    Remove a previously scheduled callback from a queue.
  28. //
  29.  void
  30. NTDescheduleCallback(    NTThreadPriority priority,
  31.             timerFunc func,
  32.             void *    arg );
  33.  
  34. //
  35. // NTDescheduleCallbackAtomically:
  36. //    Sampe as above, except will wait for any pending callout to complete
  37. //    Will deadlock if called from the callout routine itself.
  38. //
  39.  void
  40. NTDescheduleCallbackAtomically(    NTThreadPriority priority,
  41.                     timerFunc func,
  42.                     void *    arg );
  43.  
  44. //
  45. // NTCurrentRealTime:
  46. //
  47. //    Report the callout system's idea of the current real time.
  48. //    The origin point for the time value is OS-dependent.  The
  49. //    value is normally used only in measuring intervals.
  50. double NTCurrentRealTime(void);
  51.  
  52.